<template>
  <h1>欢迎来到登录页面</h1>
  <el-button @click="goHome">回到首页</el-button>
  <Welcome></Welcome>
</template>

<script>
// import { defineProps, reactive } from "vue";
// import { useRouter } from "vue-router";

// const router = useRouter();
// const goHome = () => {
//   router.push("/welcome");
// };
import Welcome from "./Welcome.vue";
export default {
  name: "login",
  components: {
    Welcome,
  },
  mounted() {
    this.$request({
      method: "get",
      url: "/login",
      data: {
        name: "jack",
      },
    }).then((res) => {
      console.log(res);
    });
  },
  methods: {
    goHome() {
      this.$router.push("/welcome");
      // console.log(123);
    },
  },
};
</script>